/*    */ package com.hs.activation.common.Interceptor;
/*    */ import com.hs.activation.common.annotation.PassToken;
/*    */ import com.hs.activation.common.result.Result;
/*    */ import com.hs.activation.common.result.ResultCode;
/*    */ import com.hs.activation.common.utils.BaseUtil;
/*    */ import com.hs.activation.entity.User;
/*    */ import com.hs.activation.service.IUserService;
/*    */ import java.io.IOException;
/*    */ import java.io.PrintWriter;
/*    */ import java.lang.reflect.Method;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.web.method.HandlerMethod;
/*    */ import org.springframework.web.servlet.HandlerInterceptor;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class AuthenticationInterceptor
/*    */   implements HandlerInterceptor
/*    */ {
/*    */   @Autowired
/*    */   IUserService userService;
/*    */   
/*    */   public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object object) throws Exception {
/* 79 */     return true;
/*    */   }
/*    */ 
/*    */ 
/*    */   
/*    */   public void writeResponse(Result result, HttpServletResponse response) {
/* 85 */     response.setCharacterEncoding("UTF-8");
/* 86 */     response.setContentType("text/html; charset=utf-8"); 
/* 87 */     try { PrintWriter writer = response.getWriter(); 
/* 88 */       try { writer.print(BaseUtil.toJson(result));
/* 89 */         if (writer != null) writer.close();  } catch (Throwable throwable) { if (writer != null) try { writer.close(); } catch (Throwable throwable1) { throwable.addSuppressed(throwable1); }   throw throwable; }  } catch (IOException e)
/* 90 */     { e.printStackTrace(); }
/*    */   
/*    */   }
/*    */ }


/* Location:              C:\Users\yzc\Desktop\新建文件夹 (3)\activation-0.0.16.jar!\BOOT-INF\classes\com\hs\activation\common\Interceptor\AuthenticationInterceptor.class
 * Java compiler version: 16 (60.0)
 * JD-Core Version:       1.1.3
 */